package com.wanlian.socketserver.Device.Test;

public class ProducerAndConsumer {
    public static void main(String[] args) throws InterruptedException {
//        BlockingQueue<KeyPara> queue = new LinkedBlockingQueue<KeyPara>(10);
//        OnlineWorker onlineWorker1 = new OnlineWorker(queue);
//        PostWorker postWorker1 = new PostWorker(queue);
//        Thread t1 = new Thread(onlineWorker1);
//        Thread c1 = new Thread(postWorker1);
//        t1.start();
//        c1.start();

        // 执行2s后，生产者不再生产
        //Thread.sleep(100 * 1000);
        //onlineWorker1.stopThread();
        //producerThread2.stopThread();

    }
}
